/*
 * VirtualCurrency.h
 *
 *  Created on: 2013. 10. 31.
 *      Author: jjaehuny
 */

#ifndef PROJECTZ_NLOGIC_VIRTUALCURRENCY_H_
#define PROJECTZ_NLOGIC_VIRTUALCURRENCY_H_

namespace ProjectZ {
class User;
} /*ProjectZ*/

namespace ProjectZ { namespace NLogic {

class VirtualCurrency
{
public:
	struct Data {
		int _zen;
	};

public:
	VirtualCurrency(User * pUser);
	virtual ~VirtualCurrency();

	void 	Initialize();
	void	Finalize();

	bool	AddZen(int value, int & nowZen);
	bool	SubZen(int value, int & nowZen);

	int		GetZen();

private:
	bool	loadFromDataBase();
	bool	updateToDatabase();

private:
	Data	_data;
	User *	_user;
	bool  	_bLoad;
};

} /*NLogic*/ } /* namespace ProjectZ */

#endif /* PROJECTZ_NLOGIC_VIRTUALCURRENCY_H_ */
